package com._21cn.framework.base.service;

import com._21cn.framework.flip.PageList;

import java.util.Collection;
import java.util.Map;

/**
 * Created by Oscar on 2016/5/24.
 */
public interface BaseService<T> {

    void insert( T object );

    int update( T object );

    int update( Map<String,Object> param );

    int delete( Map<String,Object> param );

    int delete( Object id );

    T getById( Object id );

    int getCount( Map<String,Object> param );

    PageList<T> getList(Map<String,Object> params, int pageNo, int pageSize, boolean doCount);

    PageList<T> getList(Map<String,Object> params, int pageNo, int pageSize);

    int batchDelete( Collection<?> ids );

    int batchDelete( Object[] ids );

    int batchUpdate( Collection<T> objects );

    int batchUpdate( T... objects );

    int batchInsert( Collection<T> objects );

    int batchInsert( T... objects );

}
